<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>解析管理</title>
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="col-md-12">
			<div class="col-md-2" style="border-right: 5px solid #fff;">
				<div class="row panel panel-info">
					<div class="caption panel-heading">
						<span class="caption-subject font-dark bold uppercase">分析失败统计</span>
						<select id="db" style="float: right; width: 60%;position: relative;bottom: 6px; right:5px" class="form-control" data-style="form-control">
							<option value="db1">99.16-newsdb</option>
							<option value="db2">99.16-newsdb_abroad</option>
							<option value="db3">20.8-newsdb_abroad</option>
						</select>
					</div>
					<table id="failTab" style="width: 100%;"></table>
				</div>
			</div>
			<div class="col-md-10">
				<div class="row panel panel-info">
					<div class="caption panel-heading">
						<span id="regularTitle" class="caption-subject font-dark bold"></span>
						<a class="btn btn-primary btn-sm" style="float: right; position: relative;bottom: 5px;" onclick="dealRegular()">
							<i class="fa fa-plus" aria-hidden="true"></i>添加</span>
						</a>
						<select id="entryList" style="float: right;width: 30%;position: relative;bottom: 6px; right:5px" class="form-control" data-style="form-control"></select>
						<span class="caption-subject font-dark bold" style="float: right;padding-right: 20px;" id="sourTitle"></span>
					</div>
					<table id="regularTab"></table>
				</div>
				<div class="row panel panel-info">
					<div class="caption panel-heading">
						<span id="editTitle" class="caption-subject font-dark bold uppercase">新增解析</span>
					</div>
					<div class="form-group col-md-12" style="margin-top: 5px;">
						<input id="select" name="select" class="form-control" type="text" autocomplete="off" placeholder="选择器(select)">
					</div>
					<div class="form-group col-md-12">
						<input id="attr" name="attr" class="form-control" type="text" autocomplete="off" placeholder="属性(attr)">
					</div>
					<div class="form-group col-md-12">
						<input id="regex" name="regex" class="form-control" type="text" autocomplete="off" placeholder="正则(regex)">
					</div>
					<div class="col-md-12">
						<div class="form-group col-md-3" style="border:1px solid #ddd">
							<select id="regulartype" name="regulartype" class="form-control" data-style="form-control" title="---属性类型(regulartype)--">
								<option value="1">发布时间</option>
								<option value="2">作者</option>
								<option value="3">来源</option>
								<option value="4">标题</option>
								<option value="5">文章正文</option>
							</select>
						</div>
						<div class="form-group col-md-3" style="border:1px solid #ddd">
							<select id="selectorType" name="selectorType" class="form-control" data-style="form-control" title="---选择器类型(selectorType)--">
								<option value="0">CSS</option>
								<option value="1">XPATH</option>
							</select>
						</div>
						<div class="form-group col-md-3" style="border:1px solid #ddd">
							<select id="fieldtype" name="fieldtype" class="form-control" data-style="form-control" title="---数据类型(fieldtype)--">
								<option value="string">string</option>
								<option value="double">double</option>
								<option value="date">date</option>
								<option value="english_date">english_date</option>
								<option value="second">second</option>
								<option value="millisecond">millisecond</option>
								<option value="desc">desc</option>
							</select>
						</div>
						<div class="form-group col-md-3" style="border:1px solid #ddd">
							<input id="desc" name="desc" class="form-control" value="发布时间" style="border:1px solid #fff" type="text" autocomplete="off" placeholder="说明(desc)">
						</div>
					</div>
					<div class="form-group col-md-7">
						<input id="dateformat" name="dateformat" class="form-control" type="text" autocomplete="off" placeholder="日期格式(dateformat)">
					</div>
					<div class="form-group col-md-3" id="sourceDiv">
						<label style="margin-top: 5px; font-weight: normal;">将此设置添加到同source下其他entry</label>
						<div class="checkbox-inline" style="margin-bottom: 20px;">
							<input id="source" type="checkbox" >
						</div>
					</div>
					<div class="form-group col-md-1">
						<a class="btn btn-primary btn-sm" id="commit" onclick="commitForm()">提交</span></a>
					</div>
				</div>
				<div class="row panel panel-info">
					<div class="caption panel-heading">
						<a onclick="htmlList()">
							<i class="fa fa-refresh" id="refresh"></i>
						</a>	
						<span id="htmlTitle" class="caption-subject font-dark bold uppercase"></span>
						<span id="wrongTotal" class="caption-subject bold" style="color: red"></span>
						<a class="btn btn-primary btn-sm" onclick="resetEntry()">重新解析</a>
						<a class="btn btn-danger btn-sm" style="float: right;position: relative;bottom: 0px; right:20px" onclick="removeBatch()"><i class="fa fa-trash" aria-hidden="true"></i>全部删除</a>
						<a class="btn btn-danger btn-sm" style="float: right;position: relative;bottom: 0px; right:20px;left: -60px;" onclick="removeHtmls()"><i class="fa fa-trash" aria-hidden="true"></i>删除</a>
					</div>
					<table id="htmlTab"></table>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	<script type="text/javascript" th:src="@{/js/appjs/conweb/conweb.js}"></script>
</body>
</html>